package prj5;

import org.junit.Test;
import student.TestCase;
import student.testingsupport.annotations.Hint;

/**
 * Test RaceStatusData.
 * @author xinruili
 * @version 1.0
 */
public class RaceStatusDataTest extends TestCase {
    private RaceStatusData race;

    /**
     * sets up any needed variables for test methods.
     * @throws Exception sets up variables
     * @author xinruili
     * @version 1.0
     */
    @Override
    public void setUp() throws Exception {
        super.setUp();
        race = new RaceStatusData("raceName",
                "1024", "12");
    }

    /**
     * testGetRaceName.
     */
    @Hint("")
    public void testGetRaceName() {
        assertEquals("raceName", race.getRaceName());
    }

    /**
     * testGetCaseNumber.
     */
    @Test
    public void testGetCaseNumber() {
        assertEquals("1024",
                race.getCaseNumber());
    }

    /**
     * testGetCFR.
     */
    public void testGetCFR() {
        assertEquals("1.2",
                race.getCfr());
    }

    /**
     * testGet the toString.
     */
    public void testToString() {
        String soutData = "RaceStatusData{"
                + "raceName='raceName', caseNumber='1024', "
                + "deathNumber='12', CFR='1.2', "
                + "CFRAccuracy=40}";
        assertEquals(race.toString(), soutData);
    }
}
